﻿<div class="nav-collapse">

@if (Request.IsAuthenticated) {
    <p class="navbar-text pull-right">
        Hello, @Html.ActionLink(User.Identity.Name, "ChangePassword", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Change password" })!
        <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
    </p>
} else {
    <ul class="nav pull-right">
        <li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
</div>
@using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" })) {
    @Html.AntiForgeryToken()
}
